package cn.myschool.dao;

import cn.myschool.entity.Subject;
import cn.myschool.pojo.Subject2;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SubjectDao {
    public List<Subject> findALL();

    /**
     * 查询分页
     * @param pageNo 页码
     * @param pageSize 页大小
     * @return
     */
    public List<Subject2> paging(@Param("pageNo") int pageNo, @Param("pageSize") int pageSize, @Param("subjectname") String sname);
    public int  findTotal(@Param("subjectname") String subjectname);

    public Subject get(long id);
    public int add(Subject s);
    public int add2(Map<String, Object> s);
    public int update(Subject s);

    int del(long id);

    public int checkName(String name);
}
